The present invention relates to: an image processing method and an image processing apparatus each extracting features of a document image and determining, based on the extracted features, similarity between the document image and a reference image; and an image forming apparatus each including such an image processing apparatus.
Proposed methods for reading a document with a scanner, matching image data, obtained by reading the document, with image data stored in advance, and determining similarity between the images include: a method in which keywords are extracted from images by an OCR (Optical Character Reader), for example, and similarity of the images is determined based on the extracted keywords; and a method in which images, whose similarity is to be determined, are restricted to formatted images having ruled lines, and features of the ruled lines are extracted to determine similarity of the images.
However, in order to accurately determine image similarity in these determination processes, the skew or the like of a document to be read must be preliminarily corrected (i.e., skew correction must be performed), and there arises a problem that image similarity cannot be accurately determined if skew correction cannot be performed. Further, since a process performed in determining image similarity is complicated, it has been difficult to realize the process by hardware. If the similarity determination process is to be realized by a simple algorithm, the process can be easily realized by hardware; however, the determination accuracy cannot be improved, and furthermore, there arises a problem that the resistance to skew or disturbance such as noise becomes insufficient.
To cope with such problems, Non-Patent Document 1 (Tomohiro Nakai and three others, “Document Image Retrieval Based on Cross-Ratio and Hashing”, Technical Report of the Institute of Electronics, Information and Communication Engineers, March 2005) discloses a document image similarity determination method capable of accurately determining similarity even if a document image is rotated, or even if data, which does not exist in a reference image, is written. In this method, a document image is binarized to calculate a connected component, the centroid of the connected component is determined as a feature point, surrounding feature points are extracted with respect to a certain feature point, a set of three feature points, for example, are selected from the extracted feature points to calculate the ratios of distances of the feature points, and then a hash value, serving as features, is calculated using a hash function or the like based on a plurality of the calculated ratios. This hash value is stored in a table in association with an index indicative of a document for each plurality of document formats (reference documents) in advance, and document image matching is carried out by voting for a document format corresponding to the hash value calculated from the read (read out) document image and by performing a threshold process on the number of obtained votes. Centroids, each calculated as a feature point, are unlikely to be susceptible to noise or the like, and even if the rotation, parallel movement or the like of a document has occurred, a relative positional relationship between centroids does not change; thus, a similarity determination process unsusceptible to disturbance can be realized by carrying out matching using features based on the ratios of the distances between centroids (feature points).